﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master"Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	SelectPhienDauGia
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent1" runat="server">
	<span class="AdminTitle" style="color:#cc0000;">PhienDauGia Management</span>
	(<a href="<%= Url.Action("Index", "Home") %>" class="AdminPageText">
	<%= WebConfiguration.SiteName  %>
	</a>|
	<a href="<%= Url.Action("LogOff", "Account") %>" class="AdminPageText">
		LogOut
	</a>)
	<br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent2" runat="server">  
	<% using (Html.BeginForm("UpdatePhienDauGia", "Admin", FormMethod.Post, new { enctype = "multipart/form-data", onsubmit = "return ValidatePhienDauGia();" }))
	{ %>
		<input type="hidden" name="PhienDauGia_ID" value="<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].ID %>" />
		<input type="hidden" name="PhienDauGia_IDHinhThucDauGia" value="<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].IDHinhThucDauGia %>" />
		<input type="hidden" name="PhienDauGia_IDSanPham" value="<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].IDSanPham %>" />
		<input type="hidden" name="PhienDauGia_IDNguoiDang" value="<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].IDNguoiDang %>" />
		<div style="padding-top: 40px">
			<span style="font-size:18px; font-weight:bold;">DetailOf PhienDauGia</span>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="AdminPageText">
				<tbody>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">TenSanPham: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%=  Model.PhienDauGiaModel.GetModel.LstObjModel[0].SanPham.TenSanPham %>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">XuatXu: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].SanPham.XuatXu%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">MoTa: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].SanPham.MoTa%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">HinhAnh: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<img src="../../Content/Images/Items/<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].SanPham.HinhAnh %>" width="120px" height="120px" />
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">ThoiGianBatDau: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].ThoiGianBatDau %>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">ThoiGianKetThuc: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Model.PhienDauGiaModel.GetModel.LstObjModel[0].ThoiGianKetThuc %>
							</div>
						</td>
					</tr>
                <% if (Model.PhienDauGiaModel.GetModel.LstObjModel[0].HinhThucDauGia.TenHinhThucDauGia.ToUpper().Contains("ANH"))
                   { %>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">GiaKhoiDiem: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= String.Format("{0:#,##0;Nothing}", Model.PhienDauGiaModel.GetModel.LstObjModel[0].GiaKhoiDiem) %> VNĐ
							</div>
						</td>
					</tr>
                <% }
                       else
                   { %>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">GiaToiThieu: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= String.Format("{0:#,##0;Nothing}", Model.PhienDauGiaModel.GetModel.LstObjModel[0].GiaToiThieu) %> VNĐ
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">TienDatCoc: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= String.Format("{0:#,##0;Nothing}", Model.PhienDauGiaModel.GetModel.LstObjModel[0].TienDatCoc) %> VNĐ
							</div>
						</td>
					</tr>
                <% } %>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">KetQua: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
                                <%
                                    List<SelectListItem> kqitems = new List<SelectListItem>();
                                    kqitems.Add(new SelectListItem { Text = "Chờ đấu giá", Value = "Chờ đấu giá" });
                                    kqitems.Add(new SelectListItem { Text = "Đấu giá thành công", Value = "Đang đấu giá" });
                                    kqitems.Add(new SelectListItem { Text = "Đấu giá thất bại", Value = "Đã đấu giá" });
                                %>
                                <%= Html.DropDownList("PhienDauGia_KetQua", new SelectList(kqitems, "Value", "Text", Model.PhienDauGiaModel.GetModel.LstObjModel[0].KetQua))%>
							</div>
						</td>
					</tr>
                    <tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">XuatHienOTrangChu: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.CheckBox("PhienDauGia_XuatHienOTrangChu", Model.PhienDauGiaModel.GetModel.LstObjModel[0].XuatHienOTrangChu)%>
							</div>
						</td>
					</tr>
                    <tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">Duyet: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.CheckBox("PhienDauGia_Duyet", Model.PhienDauGiaModel.GetModel.LstObjModel[0].Duyet)%>
							</div>
						</td>
					</tr>
					<tr>
						<td height="20" style="width: 130px">
						</td>
						<td height="20">
							<div align="left">
								<br/>
								<input type="submit" value="Update" />
								<p>
								</p>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	<% } %>
</asp:Content>
